/*
 * @Description: 
 * @Author: Zilu
 * @Date: 2021-11-10 17:19:23
 * @Version: 
 * @LastEditTime: 2021-11-10 19:14:23
 * @LastEditors: Zilu
 */

// zippo2.c -- 通过指针获取zippo的信息
#include <stdio.h>

int main(int argc, char const *argv[])
{
    int zippo[4][2] = {{2, 4}, {6, 8}, {1, 3}, {5, 7}};
    int *pw = zippo;
    // int a = 1;
    // int *pr = &a;
    // printf("%d\n",pw[6]);
    // printf("%p = %d, %p = %d\n", pr, pr[0], pr + 2, pr[2]);
    int(*pz)[2];
    pz = zippo;

    printf("  pz = %p,    pz + 1 = %p\n", pz, pz + 1);
    printf("pz[0] = %p, pz[0] + 1 = %p\n", pz[0], pz[0] + 1);
    printf(" *pz = %p,   *pz + 1 = %p\n", *pz, *pz + 1);
    printf("pz[0][0] = %d\n", pz[0][0]);
    printf("  *pz[0] = %d\n", *pz[0]);
    printf("    **pz = %d\n", **pz);
    printf("      pz[2][1] = %d\n", pz[2][1]);
    printf("*(*(pz+2) +1) = %d\n", *(*(pz + 2) + 1));

    return 0;
}



